<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>RVM : Using buildit</title>
        <link rel="stylesheet" href="styles/site.css" type="text/css" />
        <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>

    <body>
        <div id="page">
            <div id="main">
                <div id="main-header" class="pageSectionHeader">
                    <h1 id="title-heading" class="pagetitle">
                                                <span id="title-text">
                            RVM : Using buildit
                        </span>
                    </h1>

                    <div class="page-metadata">
                        <p>This page last changed on Dec 21, 2011 by <font color="#0050B2">dgrove</font>.</p>
                    </div>
                </div>

                <div id="content" class="view">
                    <div id="main-content" class="wiki-content group">
                    <h1 id="Usingbuildit-Overview">Overview</h1><p>The buildit script is a handy way to build and test the system.  It has countless features and options to make building and testing really easy, particularly in a multi-machine environment, where you edit on one machine and build and test on others.  If you really want to get the most of it, take a look at all the options by running:</p><pre>bin/buildit -h</pre><p>...or read the script itself.</p><h1 id="Usingbuildit-Examples">Examples</h1><p>Here we just provide a hand full of examples of how it is often used, first for <strong>building</strong> and secondly for <strong>testing</strong> (which includes building).  Please add to the list if you have other really useful ways of using it.  In the examples below, we'll use three hypothetical hosts: <strong>habanero</strong> (your desktop), <strong>jalapeno</strong> (a remote x86 machine) and <strong>chipotle</strong> (a remote PowerPC machine).</p><h2 id="Usingbuildit-Building">Building</h2><p>To build a production image on your desktop, <em>habanero</em>, do the following: </p><pre>bin/buildit habanero production</pre><p>Or <em>equivalently</em>:</p><pre>bin/buildit localhost production</pre><p>To build a production image on the remote machine <em>jalapeno</em>, do the following: </p><pre>bin/buildit jalapeno production</pre><h4 id="Usingbuildit-CrossPlatformBuilding ">Cross Platform Building </h4><p>To build a production image on the remote PowerPC machine <em>chipotle</em>, do the following: </p><pre>bin/buildit chipotle production</pre><p>Since building on a PowerPC machine can take a long time, you might prefer to build on your x86 machine <em>jalapeno</em> and cross-build to <em>chipotle</em>.  In that case you would just do the following: </p><pre>bin/buildit jalapeno -c chipotle production</pre><p>In each case, buildit figures out the host types by interrogating them and does the right thing (forcing a PPC build on the x86 host jalapeno since you've told it you want a build for chipotle, which it knows is PPC).  Buildit caches the host information, and will prompt you the first time it encounters a new host. </p><h4 id="Usingbuildit-FullBuildSpecification ">Full Build Specification </h4><p>If you want to specify the build fully, you can do something like this:</p><pre>bin/buildit jalapeno FastAdaptive MarkSweep</pre><p>If you want to specify multiple different GCs you could do:</p><pre>bin/buildit jalapeno FastAdaptive MarkSweep SemiSpace GenMS</pre><p>which would build all three configurations on jalapeno.</p><h4 id="Usingbuildit-ProfiledBuilds">Profiled Builds</h4><p>Jikes RVM has the capacity to profile the boot image and then re-build an optimized boot image based on the profiles.  This process takes a little longer, but results in measurably faster builds, and so should be used when doing performance testing.  Buildit lets you do this trivially:</p><pre>bin/buildit jalapeno --profile production</pre><h2 id="Usingbuildit-Testing">Testing</h2><p>Jikes RVM currently has a notion of a &quot;<strong>test-run</strong>&quot;, which defines a complete test scenario, including tests and builds.  An example is <em>pre-commit</em>, which runs a small suite of pre-commit tests.  It also has the notion of a &quot;<strong>test</strong>&quot;, which just specifies a particular set of tests, not the full scenario.  An example is <em>dacapo</em>, which just runs the <a href="http://dacapo-bench.org" class="external-link" rel="nofollow">DaCapo</a> test suite (see the testing/tests directory for the available tests).</p><h4 id="Usingbuildit-Runningatest-run">Running a test-run</h4><p>To run the pre-commit test-run on your host jalapeno just do:</p><pre>bin/buildit jalapeno --test-run pre-commit jalapeno</pre><h4 id="Usingbuildit-Runningatest">Running a test</h4><p>To run the dacapo tests against a production on the host jalapeno, do:</p><pre>bin/buildit jalapeno -t dacapo production</pre><p>To run the dacapo tests against a FastAdaptive MarkSweep build, on the host jalapeno, do:</p><pre>bin/buildit jalapeno -t dacapo FastAdaptive MarkSweep</pre><p>To run the dacapo and SPECjvm98 tests against production on the host jalapeno, do:</p><pre>bin/buildit jalapeno -t dacapo -t SPECjvm98 production</pre><p><br class="atl-forced-newline" /> </p>
                    </div>

                    
                 
                </div>             </div> 
            <div id="footer" style="background: url(http://docs.codehaus.org/images/border/border_bottom.gif) repeat-x;">
                <p><small>Document generated by Confluence on Feb 17, 2012 10:24</small></p>
            </div>
        </div>     </body>
</html>
